﻿using System;
using System.Web.UI;
using System.Web.UI.HtmlControls; 

/// <summary>
/// Summary description for ClassBase
/// </summary>
public class ClassBase: Page
{
	public ClassBase()
	{
		//
		// TODO: Add constructor logic here
		//
	}
    public string Title { get; set; }

    public string Keywords { get; set; }

    public string Description { get; set; }

    protected override void OnLoadComplete(EventArgs e)
    {
        //this.Page.Title = PageTitle;
        CreatMetaTags();

        base.OnLoadComplete(e);
    }

    private void CreatMetaTags()
    {
        this.Page.Title = Title;
        HtmlHead head = (HtmlHead)Page.Header;

        HtmlMeta word = new HtmlMeta();
        word.Name = "keywords";
        word.Content = Keywords;
        head.Controls.Add(word);

        HtmlMeta desc = new HtmlMeta();
        desc.Name = "description";
        desc.Content = Description;
        head.Controls.Add(desc);
    }

    //void Page_PreInit(Object sender, EventArgs e)
    //{
    //    if (Session["masterpage"] != null)
    //    {
    //        this.MasterPageFile = (String)Session["masterpage"];
    //    }
    //}
}